/*
 * An XML document type.
 * Localname: timer
 * Namespace: urn:jbpm.org:jpdl-3.2
 * Java type: x2.orgJpdl3.jbpm.TimerDocument
 *
 * Automatically generated - do not modify.
 */
package x2.orgJpdl3.jbpm.impl;
/**
 * A document containing one timer(@urn:jbpm.org:jpdl-3.2) element.
 *
 * This is a complex type.
 */
public class TimerDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements x2.orgJpdl3.jbpm.TimerDocument
{
    private static final long serialVersionUID = 1L;
    
    public TimerDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TIMER$0 = 
        new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "timer");
    
    
    /**
     * Gets the "timer" element
     */
    public x2.orgJpdl3.jbpm.TimerDocument.Timer getTimer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.TimerDocument.Timer target = null;
            target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().find_element_user(TIMER$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "timer" element
     */
    public void setTimer(x2.orgJpdl3.jbpm.TimerDocument.Timer timer)
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.TimerDocument.Timer target = null;
            target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().find_element_user(TIMER$0, 0);
            if (target == null)
            {
                target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().add_element_user(TIMER$0);
            }
            target.set(timer);
        }
    }
    
    /**
     * Appends and returns a new empty "timer" element
     */
    public x2.orgJpdl3.jbpm.TimerDocument.Timer addNewTimer()
    {
        synchronized (monitor())
        {
            check_orphaned();
            x2.orgJpdl3.jbpm.TimerDocument.Timer target = null;
            target = (x2.orgJpdl3.jbpm.TimerDocument.Timer)get_store().add_element_user(TIMER$0);
            return target;
        }
    }
    /**
     * An XML timer(@urn:jbpm.org:jpdl-3.2).
     *
     * This is a complex type.
     */
    public static class TimerImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements x2.orgJpdl3.jbpm.TimerDocument.Timer
    {
        private static final long serialVersionUID = 1L;
        
        public TimerImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName ACTION$0 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "action");
        private static final javax.xml.namespace.QName SCRIPT$2 = 
            new javax.xml.namespace.QName("urn:jbpm.org:jpdl-3.2", "script");
        private static final javax.xml.namespace.QName DUEDATE$4 = 
            new javax.xml.namespace.QName("", "duedate");
        private static final javax.xml.namespace.QName NAME$6 = 
            new javax.xml.namespace.QName("", "name");
        private static final javax.xml.namespace.QName REPEAT$8 = 
            new javax.xml.namespace.QName("", "repeat");
        private static final javax.xml.namespace.QName TRANSITION$10 = 
            new javax.xml.namespace.QName("", "transition");
        
        
        /**
         * Gets the "action" element
         */
        public x2.orgJpdl3.jbpm.ActionDocument.Action getAction()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ActionDocument.Action target = null;
                target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().find_element_user(ACTION$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * True if has "action" element
         */
        public boolean isSetAction()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(ACTION$0) != 0;
            }
        }
        
        /**
         * Sets the "action" element
         */
        public void setAction(x2.orgJpdl3.jbpm.ActionDocument.Action action)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ActionDocument.Action target = null;
                target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().find_element_user(ACTION$0, 0);
                if (target == null)
                {
                    target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().add_element_user(ACTION$0);
                }
                target.set(action);
            }
        }
        
        /**
         * Appends and returns a new empty "action" element
         */
        public x2.orgJpdl3.jbpm.ActionDocument.Action addNewAction()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ActionDocument.Action target = null;
                target = (x2.orgJpdl3.jbpm.ActionDocument.Action)get_store().add_element_user(ACTION$0);
                return target;
            }
        }
        
        /**
         * Unsets the "action" element
         */
        public void unsetAction()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(ACTION$0, 0);
            }
        }
        
        /**
         * Gets the "script" element
         */
        public x2.orgJpdl3.jbpm.ScriptDocument.Script getScript()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ScriptDocument.Script target = null;
                target = (x2.orgJpdl3.jbpm.ScriptDocument.Script)get_store().find_element_user(SCRIPT$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * True if has "script" element
         */
        public boolean isSetScript()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(SCRIPT$2) != 0;
            }
        }
        
        /**
         * Sets the "script" element
         */
        public void setScript(x2.orgJpdl3.jbpm.ScriptDocument.Script script)
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ScriptDocument.Script target = null;
                target = (x2.orgJpdl3.jbpm.ScriptDocument.Script)get_store().find_element_user(SCRIPT$2, 0);
                if (target == null)
                {
                    target = (x2.orgJpdl3.jbpm.ScriptDocument.Script)get_store().add_element_user(SCRIPT$2);
                }
                target.set(script);
            }
        }
        
        /**
         * Appends and returns a new empty "script" element
         */
        public x2.orgJpdl3.jbpm.ScriptDocument.Script addNewScript()
        {
            synchronized (monitor())
            {
                check_orphaned();
                x2.orgJpdl3.jbpm.ScriptDocument.Script target = null;
                target = (x2.orgJpdl3.jbpm.ScriptDocument.Script)get_store().add_element_user(SCRIPT$2);
                return target;
            }
        }
        
        /**
         * Unsets the "script" element
         */
        public void unsetScript()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(SCRIPT$2, 0);
            }
        }
        
        /**
         * Gets the "duedate" attribute
         */
        public java.lang.String getDuedate()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DUEDATE$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "duedate" attribute
         */
        public org.apache.xmlbeans.XmlString xgetDuedate()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DUEDATE$4);
                return target;
            }
        }
        
        /**
         * Sets the "duedate" attribute
         */
        public void setDuedate(java.lang.String duedate)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DUEDATE$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DUEDATE$4);
                }
                target.setStringValue(duedate);
            }
        }
        
        /**
         * Sets (as xml) the "duedate" attribute
         */
        public void xsetDuedate(org.apache.xmlbeans.XmlString duedate)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DUEDATE$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(DUEDATE$4);
                }
                target.set(duedate);
            }
        }
        
        /**
         * Gets the "name" attribute
         */
        public java.lang.String getName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "name" attribute
         */
        public org.apache.xmlbeans.XmlString xgetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$6);
                return target;
            }
        }
        
        /**
         * True if has "name" attribute
         */
        public boolean isSetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(NAME$6) != null;
            }
        }
        
        /**
         * Sets the "name" attribute
         */
        public void setName(java.lang.String name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$6);
                }
                target.setStringValue(name);
            }
        }
        
        /**
         * Sets (as xml) the "name" attribute
         */
        public void xsetName(org.apache.xmlbeans.XmlString name)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$6);
                }
                target.set(name);
            }
        }
        
        /**
         * Unsets the "name" attribute
         */
        public void unsetName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(NAME$6);
            }
        }
        
        /**
         * Gets the "repeat" attribute
         */
        public java.lang.String getRepeat()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REPEAT$8);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "repeat" attribute
         */
        public org.apache.xmlbeans.XmlString xgetRepeat()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(REPEAT$8);
                return target;
            }
        }
        
        /**
         * True if has "repeat" attribute
         */
        public boolean isSetRepeat()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(REPEAT$8) != null;
            }
        }
        
        /**
         * Sets the "repeat" attribute
         */
        public void setRepeat(java.lang.String repeat)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REPEAT$8);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(REPEAT$8);
                }
                target.setStringValue(repeat);
            }
        }
        
        /**
         * Sets (as xml) the "repeat" attribute
         */
        public void xsetRepeat(org.apache.xmlbeans.XmlString repeat)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(REPEAT$8);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(REPEAT$8);
                }
                target.set(repeat);
            }
        }
        
        /**
         * Unsets the "repeat" attribute
         */
        public void unsetRepeat()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(REPEAT$8);
            }
        }
        
        /**
         * Gets the "transition" attribute
         */
        public java.lang.String getTransition()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TRANSITION$10);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "transition" attribute
         */
        public org.apache.xmlbeans.XmlString xgetTransition()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TRANSITION$10);
                return target;
            }
        }
        
        /**
         * True if has "transition" attribute
         */
        public boolean isSetTransition()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(TRANSITION$10) != null;
            }
        }
        
        /**
         * Sets the "transition" attribute
         */
        public void setTransition(java.lang.String transition)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TRANSITION$10);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TRANSITION$10);
                }
                target.setStringValue(transition);
            }
        }
        
        /**
         * Sets (as xml) the "transition" attribute
         */
        public void xsetTransition(org.apache.xmlbeans.XmlString transition)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TRANSITION$10);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(TRANSITION$10);
                }
                target.set(transition);
            }
        }
        
        /**
         * Unsets the "transition" attribute
         */
        public void unsetTransition()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(TRANSITION$10);
            }
        }
    }
}
